package com.jzo2o.health.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.api.trade.enums.PayChannelEnum;
import com.jzo2o.health.model.domain.Orders;
import com.jzo2o.health.model.dto.request.PlaceOrderReqDTO;
import com.jzo2o.health.model.dto.response.OrdersPayResDTO;
import com.jzo2o.health.model.dto.response.PlaceOrderResDTO;

/**
 * 订单创建相关业务层
 * @author JIAN
 */
public interface IOrderCreateService extends IService<Orders> {
    /**
     * 微服务标识
     */
    String PRODUCT_APP_ID = "health.orders";

    /**
     * 用户下单
     */
    PlaceOrderResDTO placeOrder(PlaceOrderReqDTO placeOrderReqDTO);

    /**
     * 用户支付(返回支付二维码)
     * @param id 本系统的订单id
     */
    OrdersPayResDTO payOrder(Long id, PayChannelEnum tradingChannel);

    /**
     * 获取指定订单的支付结果
     */
    OrdersPayResDTO getPayResult(Long id);
}